package com.scm.biz.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.scm.biz.dto.ProofingOrderDto;
import com.scm.biz.dto.ProofingOrderNotice;
import com.scm.biz.query.ProofingOrderQuery;
import com.scm.biz.result.ProofingOrderResult;

import net.sf.json.JSONArray;

/**
 * 打样订单的业务类接口
 * @author Young
 * @Date 2016.11.22
 */
public interface ProofingOrderService {
	
	/**
     * 根据查询参数查询打样订单列表
     * @return
     */
	List<ProofingOrderResult> selectByPage(ProofingOrderQuery proofingOrderQuery);
	int insert(ProofingOrderDto proofingOrderDto);
	ProofingOrderResult selectById(Long id);
	/**
	 * 创建打样订单
	 * @param proofingOrderDto
	 * @return 创建的打样订单ID
	 */
	Long save(ProofingOrderDto proofingOrderDto,HttpServletRequest req) throws Exception;

	public void saveClose(
			Long proofingOrderId);
	
	/**
	 * 填写通知单，修改打样订单
	 * @param req
	 * @throws Exception
	 */
	void update(HttpServletRequest req,JSONArray arr) throws Exception;
	
	/**
     * 根据子订单ID，查询订单数据
     * @param proofingPatternId
     * @return
     */
    ProofingOrderNotice getByProofingPatternId(Long proofingPatternId);
    
    /**
     * 打样订单总数
     * @param proofingOrderQuery
     * @return
     */
    public int selectTotal(ProofingOrderQuery proofingOrderQuery);
}
